package edu.polsl.bio.str.node.logic;

/**
 * //todo class description
 * <p/>
 * Created on: Jun 12, 2011 2:51:41 PM <br/>
 * <a href="http://www.polsl.pl">www.polsl.pl</a>
 *
 * @author lukasz.olczak@polsl.pl
 */
public class NodeContext {

  private String nodeIp;

  private String managerIp;

  private boolean isAttached;

  private long nodeId;

  private int numberOfCpu;

  private int numberOfActiveJobs;

  public synchronized void incNoJobs() {
    numberOfActiveJobs++;
  }

  public synchronized void decNoJobs() {
    numberOfActiveJobs--;
  }

  public long getNodeId() {
    return nodeId;
  }

  public void setNodeId(long nodeId) {
    this.nodeId = nodeId;
  }

  public String getNodeIp() {
    return nodeIp;
  }

  public void setNodeIp(String nodeIp) {
    this.nodeIp = nodeIp;
  }

  public String getManagerIp() {
    return managerIp;
  }

  public void setManagerIp(String managerIp) {
    this.managerIp = managerIp;
  }

  public boolean isAttached() {
    return isAttached;
  }

  public void setAttached(boolean attached) {
    isAttached = attached;
  }

  public int getNumberOfCpu() {
    return numberOfCpu;
  }

  public void setNumberOfCpu(int numberOfCpu) {
    this.numberOfCpu = numberOfCpu;
  }

  public synchronized int getNumberOfActiveJobs() {
    return numberOfActiveJobs;
  }

  public void setNumberOfActiveJobs(int numberOfActiveJobs) {
    this.numberOfActiveJobs = numberOfActiveJobs;
  }
}
